<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./font/iconfont.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .big {
            width: 400px;
            margin: 100px auto;
            border-left: 1px #999 solid;
            border-right: 1px #999 solid;
            position: relative;
        }

        .top {
            width: 350px;
            height: 30px;
            background-color: #f6f5f5;
            display: inline-flex;
            padding: 5px 15px;
            border-radius: 15px;
            margin-bottom: 5px;
        }

        .zjt {
            font-size: 30px;
        }

        .shang {
            display: flex;
            border-bottom: #eee7e7 solid 1px;
        }
        .top input {
            width: 300px;
            border: 0;
            background-color: transparent;
            margin-left: 10px;
        }

        .fdj {
            font-size: 20px;
        }

        ul li {
            width: 80px;
            height: 40px;
            padding-top: 10px;
            padding-left: 20px;
        }
        li{
            list-style: none;
        }
        ol li{
            width: 50px;
            height: 80px;
            float: left;
            margin-left: 25px;
        }
        .zy{
            display: flex;
        }
        .zy div{
            margin-top: 18px;
        }
        h5{
            margin-bottom: 7px;
            margin-left: 10px;
        }
        .two{
            display: none;
        }
        .a{
            font-size: 30px;
        }
        .b{
            margin-left: 50px;
        }
        .xia{
            position: fixed;
        }
    </style>
</head>

<body>
    <div class="big">
        <p class="shang">
            <span class="iconfont icon-zuojiantou zjt"></span>
            <span class="top">
                <span class="iconfont icon-Magnifier fdj"></span>
                <input type="text" placeholder="乳胶漆">
            </span>
        </p>
        <div class="zy">
            <ul style="background-color: #f6f5f5;">
                <li style="color: red; background:#fff;" class="l1">食品</li>
                <li class="l2">电器</li>
                <li>洗护</li>
                <li>女装</li>
                <li>手机</li>
                <li>电器</li>
                <li>洗护</li>
                <li>女装</li>
                <li>手机</li>
                <li>电器</li>
                <li>洗护</li>
                <li>女装</li>
                <li>手机</li>
            </ul>
            <div class="one">
                <h5>休闲食品</h5>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./古月方源.jpeg" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
            </div>
            <div class="two">
                <h5>休闲食品</h5>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
                <ol style="margin-left: 20px;">
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">糖果</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">辣条豆干</span></center>
                    </li>
                    <li>
                        <img style="width: 50px; height: 50px;" src="./angel.gif" alt=""><br>
                        <center><span style="font-size: 10px;">零食大礼包</span></center>
                    </li>
                </ol>
            </div>
        </div>
        <div class="xia">
            <p style="display:flex;">
                <span class="b">
                    <span class="iconfont icon-jingdong a"></span><br>
                    <span>首页</span>
                </span>
                <span class="b" style="color: red;">
                    <span class="iconfont icon-fenlei a"></span><br>
                    <span>分类</span>
                </span>
                <span class="b">
                    <span class="iconfont icon-gouwuchekong a"></span><br>
                    <span>购物车</span>
                </span>
                <span class="b">
                    <span class="iconfont icon-yonghu a"></span><br>
                    <span>未登录</span>
                </span>
            </p>
        </div>
    </div>
</body>
</html>
<script>
    var l1=document.querySelector('.l1')
    var l2=document.querySelector('.l2')
    var one=document.querySelector('.one')
    var two=document.querySelector('.two')
    l1.onclick=function(){
        one.style.display='block'
        two.style.display='none'
        l1.style.color='red'
        l1.style.background='#fff';
        l2.style.color='black'
        l2.style.background='#f6f5f5'
    }
    l2.onclick=function(){
        one.style.display='none'
        two.style.display='block'
        l1.style.color='black'
        l1.style.background='#f6f5f5'
        l2.style.color='red'
        l2.style.background='#fff';
    }
</script>